import request from '@/utils/request'

// 查询知识关卡列表
export function listAppSite(query) {
  return request({
    url: '/applet/appSite/list',
    method: 'get',
    params: query
  })
}

export function selectAppSite() {
  return request({
    url: '/applet/appSite/select',
    method: 'get',
  })
}


// 查询知识关卡详细
export function getAppSite(id) {
  return request({
    url: '/applet/appSite/' + id,
    method: 'get'
  })
}

// 新增知识关卡
export function addAppSite(data) {
  return request({
    url: '/applet/appSite',
    method: 'post',
    data: data
  })
}

// 修改知识关卡
export function updateAppSite(data) {
  return request({
    url: '/applet/appSite',
    method: 'put',
    data: data
  })
}

// 修改知识关卡状态
export function changeSiteStatus(id, status) {
  return request({
    url: `/applet/appSite/changeStatus/${id}/${status}`,
    method: 'get'
  })
}


// 删除知识关卡
export function delAppSite(id) {
  return request({
    url: '/applet/appSite/' + id,
    method: 'delete'
  })
}
